<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
    <title>传感管理</title>
    <link rel="stylesheet" type="text/css" href="<%=basePath%>static/js/lib/bootstrap/bootstrap.min.css">
    <link rel="stylesheet" type="text/css" href="<%=basePath%>static/js/lib/bootstrap/bootstrap-theme.min.css">
    <link rel="stylesheet" href="https://api.map.baidu.com/library/DrawingManager/1.4/src/DrawingManager_min.css">
    <link rel="stylesheet" href="https://api.map.baidu.com/library/SearchInfoWindow/1.4/src/SearchInfoWindow_min.css" />
    <link href="<%=basePath%>static/plugins/bui/css/bs3/bui.css" rel="stylesheet">
    <link rel="stylesheet" type="text/css" href="<%=basePath%>static/css/base.css">
    <link rel="stylesheet" type="text/css" href="<%=basePath%>static/css/module.css">
</head>

<body>
<div class="wrap">
    <!-- 头部页面 -->
    <header>
        <div class="container">
            <div class="logo">
                <img src="<%=basePath%>/static/images/logo.png">
                <div class="title">
                    <h1>莆田市供水调度系统</h1>

                </div>
            </div>
            <div class="state-message">
                <div class="nav">
                    <ul class="nav-ul">
                        <li class="nav-li"><a href="<%=basePath%>rest/web/index/toIndexList">实时监控</a></li>
                        <li class="nav-li"><a href="<%=basePath%>rest/web/eventInfo/toEventInfoList">事件管理</a></li>
                        <li class="nav-li"><a href="<%=basePath%>rest/web/danger/toDangerList">危险管控</a></li>
                        <li class="nav-li"><a href="<%=basePath%>rest/web/locationLog/toLocationLogList">人员调度</a></li>
                        <li class="nav-li"><a href="<%=basePath%>rest/web/flowDailyReport/toRealTime">报表统计</a></li>
                        <li class="nav-li"><a href="<%=basePath%>rest/web/architecture/toArchitectureList">设施分布</a></li>
                        <li class="nav-li dropdown clearfix composite-li">
                            <a class="active" id="compositeMenuDivider" data-toggle="dropdown" aria-haspopup="true"
                               aria-expanded="true">信息管理</a>
                            <ul class="composite-menu  dropdown-menu" aria-labelledby="compositeMenuDivider">
                                <li><a href="<%=basePath%>rest/web/information/toInformationList"
                                       class="composite-active">新增设施</a></li>
                                <li><a href="<%=basePath%>rest/web/dtu/toDtuList">DTU管理</a></li>
                                <li><a href="<%=basePath%>rest/web/device/toDeviceList">传感管理</a></li>
                            </ul>
                        </li>
                        <li class="nav-li"><a href="<%=basePath%>rest/web/sysuser/toSysuserList">用户管理</a></li>
                        <li class="nav-li"><a href="<%=basePath%>rest/web/about/toAbout">关于我们</a></li>
                    </ul>
                </div>
                <div class="user-message">
                    <div class="dropdown clearfix">
                        <p type="button" id="dropdownMenuDivider" data-toggle="dropdown" aria-haspopup="true"
                           aria-expanded="true">
                            ${sysuser.nickName}
                            <span class="skuiwu-caret caret"></span>
                        </p>
                        <ul class="skuiwu-menu  dropdown-menu" aria-labelledby="dropdownMenuDivider">
                            <li><a href="#">个人中心</a></li>
                            <li><a href="#">退出登录</a></li>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
    </header>
    <!--内容页面 -->
    <div class="deviceContent content">
        <div class="deviceContent-header">
            <h4>新增设备</h4>
            <button class="btn" onclick="window.location.href='/rest/web/device/toDeviceList'">返回</button>
        </div>
        <hr/>
        <form id="addForm" action="${basepath}/rest/web/device/insertDevice"
              method="post">
            <div class="deviceContent-body">
                <div class="dev-input">
                    <label>绑定DTU：</label>
                    <select class="form-control" name="dtuId">
                    </select>
                    <label>设备编号：</label>
                    <input type="text" name="code" >
                    <label>设备名称：</label>
                    <input type="text" name="name">
                    <label>地址码：</label>
                    <input type="text" name="addrCode" onkeyup="this.value=this.value.replace(/\D/g,'')" onafterpaste="this.value=this.value.replace(/\D/g,'')">
                    <label>水价：</label>
                    <input type="text" name="price" onkeyup="value=value.replace(/[^\d.]/g,'')">
                    <label>计量系数：</label>
                    <input type="text" name="factor">
                    <label>协议类型：</label>
                    <select class="form-control" name="protocolType">
                        <option value="1">流量计MOD51</option>
                        <option value="2">开封流量计4.2</option>
                        <option value="3">宏沐压力表</option>
                        <option value="4">ct v1.1</option>
                        <option value="5">ct v1.2</option>
                    </select>
                    <label>规格：</label>
                    <input type="text" name="spec" >
                    <label>寿命：</label>
                    <input type="text" name="age" onkeyup="this.value=this.value.replace(/\D/g,'')" onafterpaste="this.value=this.value.replace(/\D/g,'')">
                    <label>年份：</label>
                    <input type="text" name="year" onkeyup="this.value=this.value.replace(/\D/g,'')" onafterpaste="this.value=this.value.replace(/\D/g,'')">
                    <label>责任：</label>
                    <input type="text" name="personLiable" >
                    <label>部门：</label>
                    <input type="text" name="department" >

                </div>
                <div class="input-group" >
                    <label>备注：</label>
                    <textarea  name="remark" ></textarea>
                </div>
                <div class="map-input input-group">
                    <label>地图坐标：</label>
                    <div id="deviceMap">
                        <div id="deviceMapContent"></div>
                    </div>
                    <div class="BMapLib_Drawing BMap_noprint anchorTR" style="position: absolute; z-index: 10; text-size-adjust: none; bottom: auto; right: 5px; top: 5px; left: auto;"><div class="BMapLib_Drawing_panel"><a class="BMapLib_box BMapLib_marker" drawingtype="marker"  title="画点"  id="addMap"></a></div></div>
                </div>
            </div>
        </form>
    </div>
</div>
<script type="text/javascript" src="<%=basePath%>static/js/lib/jquery.min.js"></script>
<script type="text/javascript" src="<%=basePath%>static/js/lib/bootstrap/bootstrap.min.js"></script>
<!--bui-->
<script src="<%=basePath%>static/plugins/bui/bui.js"></script>
<script type="text/javascript" src="https://api.map.baidu.com/api?v=2.0&ak=ehGF32jTPfCia8QrpLwlKfNpGSX5em2G"></script>
<script type="text/javascript" src="https://api.map.baidu.com/library/AreaRestriction/1.2/src/AreaRestriction_min.js"></script>
<script type="text/javascript" src="https://api.map.baidu.com/library/DrawingManager/1.4/src/DrawingManager_min.js"></script>
<script type="text/javascript" src="https://api.map.baidu.com/library/SearchInfoWindow/1.4/src/SearchInfoWindow_min.js"></script>
<script type="text/javascript" src="<%=basePath%>static/js/index.js"></script>
<script type="text/javascript" src="<%=basePath%>static/js/senseDevice/senseDeviceAdd.js">
</script>
</body>

</html>
